package utils;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.Hashtable;
import java.util.TreeSet;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

/**
 * 公共变量定义
 *
 */
public final class Pub {
	public static String dataDir = "C:\\Users\\Administrator\\Desktop\\data";
	private static final Logger logger = LogManager.getLogger(Pub.class);
	public static final String VERTICAL_DIR_NAME = "vertical";
	public static final String HORIZONTAL_DIR_NAME = "horizontal";
	public static final String REFLECT_DIR_NAME = "reflect";
	public static final String NOTIFY = "notify";
	public static final String OPTIONS = "options";
	public static final String APK = "app-debug.apk";
	public static String[] vCols = new String[]{"direction", "state", "segment", "serial", "cordinate", "sv", "cv",
			"delta", "av"};
	public static String[] hCols = new String[]{

	};
	public static String[] rCols = new String[]{

	};

	public static JSONArray stageArray = new JSONArray();

	public static final String BRIDGE_XIASHA = "xiasha";
	public static final String BRIDGE_XIAOSHAN = "xiaoshan";
	public static final String ACCOUNT = "account";
	public static final String PASSWORD = "password";
	public static final String REDIRECT_URL = "redirect_url";
	public static final String STATUS = "status";
	public static final String MESSAGE = "msg";
	public static final String SENSORID = "sensorId";
	public static final String TIME = "time";
	public static final String DATA = "data";
	public static final String WARNING = "warning";
	public static final String NOT_FOUNT = "对不起，您访问的网站页面不存在^_^";
	public static final String TOKEN_ERROR = "验证码错误";
	public static final String ACCOUNT_ERROR = "用户名不存在";
	public static final String PASSWORD_ERROR = "用户密码错误";
	public static final String TOKEN = "token";
	public static final String INDEX_PAGE = "/index.html";
	public static final String LOGIN_PAGE = "/get_login.html";
	public static final int NORMAL = 0;
	public static final int ERROR = 1;
	public static final String TOKEN_ACTION = "token";
	public static final String LOGIN_ACTION = "user_login";
	public static final String STACK_TRACE = "堆栈信息";


	/* 要存储的配置项 */
	private static TreeSet<String> sensors = null;
	public static String verticalLatestFilePath = "";
	public static String horizontalLatestFilePath = "";
	public static String reflectLatestFilePath = "";
	public static Hashtable<String, Double> standardValues = null;


}
